/* Markdown编辑器样式 */
.markdown-container {
    padding: 100px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.markdown-container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
}

.description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.8;
}

.editor-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.toolbar {
    display: flex;
    gap: 8px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--input-border);
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.toolbar button {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar button:hover {
    background: var(--nav-hover);
    color: #fff;
}

.editor-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    height: 500px;
}

@media (max-width: 768px) {
    .editor-wrapper {
        flex-direction: column;
        height: auto;
    }
    
    .editor-section, .preview-section {
        height: 300px !important;
    }
}

.editor-section, .preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-section h3, .preview-section h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

#markdown-input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color);
    padding: 15px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
}

#markdown-input:focus {
    border-color: var(--nav-hover);
}

#markdown-preview {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    line-height: 1.6;
}

/* Markdown样式 */
.markdown-body {
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.markdown-body h1 {
    font-size: 2em;
    margin-top: 0.67em;
    margin-bottom: 0.67em;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 0.3em;
}

.markdown-body h2 {
    font-size: 1.5em;
    margin-top: 0.83em;
    margin-bottom: 0.83em;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 0.3em;
}

.markdown-body h3 {
    font-size: 1.17em;
    margin-top: 1em;
    margin-bottom: 1em;
}

.markdown-body h4 {
    font-size: 1em;
    margin-top: 1.33em;
    margin-bottom: 1.33em;
}

.markdown-body h5 {
    font-size: 0.83em;
    margin-top: 1.67em;
    margin-bottom: 1.67em;
}

.markdown-body h6 {
    font-size: 0.67em;
    margin-top: 2.33em;
    margin-bottom: 2.33em;
}

.markdown-body p {
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-body a {
    color: var(--nav-hover);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 16px 0;
    border-radius: 4px;
}

.markdown-body ul, .markdown-body ol {
    padding-left: 2em;
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-body blockquote {
    margin: 0 0 16px 0;
    padding: 0 16px;
    color: rgba(var(--text-color-rgb), 0.7);
    border-left: 4px solid var(--input-border);
}

.markdown-body pre {
    background-color: var(--bg-color);
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    margin-bottom: 16px;
}

.markdown-body code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background-color: var(--bg-color);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 85%;
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    display: block;
}

.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 16px;
}

.markdown-body table th, .markdown-body table td {
    border: 1px solid var(--input-border);
    padding: 6px 13px;
}

.markdown-body table tr {
    background-color: var(--bg-color);
    border-top: 1px solid var(--input-border);
}

.markdown-body hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: var(--input-border);
    border: 0;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.action-btn {
    background: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--nav-hover);
    color: #fff;
}

.action-btn.warning:hover {
    background: #ff4757;
}

/* Markdown指南 */
.markdown-guide {
    margin-top: 40px;
}

.markdown-guide h3 {
    text-align: center;
    margin-bottom: 20px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.guide-item {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--input-border);
}

.guide-item .syntax {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    padding: 8px;
    background: var(--input-bg);
    border-radius: 4px;
    margin-bottom: 8px;
}

.guide-item .description {
    text-align: left;
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
} 